# Copyright(c) 2008 Tri Tech Information Systems Inc. 
# Distributed under the Boost Software License, Version 1.0.
#     (See accompanying file ../../LICENSE_1_0.txt or copy at
#           http://www.boost.org/LICENSE_1_0.txt)
#     
import abctest as abc

def access_test():
    """
    >>> abc.B()
    <abctest.B object at 0x...>
    >>> x = abc.B()
    >>> x()
    False
    """

def docstring_test(self):
    """
    >>> print abc.A.__doc__
    This base class demonstrates abstract base class detection
    as well as callable objects, and now docstring generation
    I hope
    >>> abc.A.doit.__doc__.find('doit is what make this abstract') != -1
    True
    >>> abc.B.__init__.__doc__.find('Makes a B') != -1
    True
    >>> abc.C.__init__.__doc__.find('Makes a C') != -1
    True
    >>> abc.C.__doc__
    'C is exposed as an interface to better test docstrings'
    """

def property_test(self):
    """
    >>> a = abc.B()
    >>> a.doodad
    12
    >>> a.ping
    37
    """

class TryIt(abc.C):
    """
    >>> t = TryIt()
    >>> b = abc.B()
    >>> abc.klunk(t,b)
    inside
    """
    def fire(self, b):
        print "inside"

if __name__ == '__main__':
    import doctest
    import sys
    sys.exit(doctest.testmod(optionflags = doctest.ELLIPSIS)[0])

